package org.jeecg.modules.biz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.sql.Timestamp;
import java.util.Date;

/**
 *
 * 结算任务
 *
 */
@Data
@TableName("event_settle")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "event_settle", description = "结算事件")
public class EventSettle {

    @TableId(type = IdType.ID_WORKER_STR)
    private String id;

    // 认筹者
    @ApiModelProperty(value = "认筹者")
    private String caller;

    // 邀请人
    @ApiModelProperty(value = "邀请人")
    private String inviter;

    // 收益金额
    @ApiModelProperty(value = "收益金额")
    private Long profit;

    // 任务id
    @ApiModelProperty(value = "任务id")
    private String transactionId;

    // 结算日期
    @ApiModelProperty(value = "结算日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date date;

    // 时间戳
    @ApiModelProperty(value = "时间戳")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd hh:mm:ss")
    private Timestamp timestamp;

    public EventSettle() {

    }

    public EventSettle(String caller, String inviter, Long profit, String transactionId, Date date, Timestamp timestamp) {
        this.caller = caller;
        this.inviter = inviter;
        this.profit = profit;
        this.transactionId = transactionId;
        this.date = date;
        this.timestamp = timestamp;
    }
}
